package xyz.hujf.tool.random;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author Hujf
 * @title: ThreadLocalRandom
 * @date 2021-04-27 14:33
 * @description: ThreadLocalRandom 解决多线程随机数的生成.
 */
public class LocalRandomTest {

    public static void main(String[] args) {
        ThreadLocalRandom random = ThreadLocalRandom.current();

        for(int i=0;i<10;i++){
            System.out.println(random.nextInt(10));
        }
    }
}
